<?php
require_once 'vendor/autoload.php';

// Create the Transport
$transport = (new Swift_SmtpTransport('smtp.mail.ru', 465,'ssl'))
  ->setUsername('supports@doratv.club')
  ->setPassword('iT*AiEDuyy24')
;

// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);

$html_body = <<<'EOT'
<p style="color:red;text-align:center">hello</p>
	My <em>amazing</em> body
	<div class="as"></div>
	<style>
	.as{
	height:450px;
	width:458px;
	background:red;
	margin:0 auto;
	box-shadow:0px 5px 10px #ccc;
		}
	</style>
EOT;

// Create a message
$message = (new Swift_Message('验证码'))
  ->setFrom(['supports@doratv.club' => 'Doratv'])
  ->setTo(['adapa@qq.com'])
  ->setBody($html_body,'text/html')
  ;

// Send the message
$result = $mailer->send($message);
